Version bump idempotency - #21555
Open
ninalee12 wants to merge 9 commits into
Open
Conversation
Merge duplicate major/minor branch checks into a single step with release-type-specific error messaging.
Align branch existence validation with the tag check step.
Contributor
🤖 GitHub commentsJust comment with:
|
2 tasks
Contributor
|
This pull request does not have a backport label. Could you fix it @ninalee12? 🙏
|
v1v
reviewed
Jul 21, 2026
v1v
reviewed
Jul 22, 2026
v1v
reviewed
Jul 29, 2026
v1v
left a comment
Member
There was a problem hiding this comment.
LGTM.
I've just ran this PR locally:
$ gh pr checkout 21555
$ GITHUB_TOKEN=$(gh auth token) make minor-release RELEASE_VERSION=9.0.0 PROJECT_OWNER=v1v RELEASE_TYPE=minor$ GITHUB_TOKEN=$(gh auth token) make minor-release RELEASE_VERSION=9.4.0 PROJECT_OWNER=v1v RELEASE_TYPE=minor
INFO: Create GitHub label backport for the version 9.4.0
::group::create-github-label backport-9.4
✓ Label "backport-9.4" created in v1v/apm-server
::endgroup::
INFO: Create release branch and update new version 9.4.0
::group::create-branch 9.4
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 320 commits.
(use "git push" to publish your local commits)
Switched to a new branch '9.4'
::endgroup::
>> update-version
>> update-version-makefile
::group::git-diff
diff --git a/Makefile b/Makefile
index 652a9576a..1206b5a97 100644
--- a/Makefile
+++ b/Makefile
@@ -227,7 +227,7 @@ testing/infra/terraform/modules/%/README.md: .FORCE
# Beats synchronisation.
##############################################################################
-BEATS_VERSION?=main
+BEATS_VERSION?=9.4
BEATS_MODULE:=github.com/elastic/beats/v7
.PHONY: update-beats
diff --git a/cmd/intake-receiver/version.go b/cmd/intake-receiver/version.go
index d96214af7..6ed99d39b 100644
--- a/cmd/intake-receiver/version.go
+++ b/cmd/intake-receiver/version.go
@@ -18,4 +18,4 @@
package main
// version matches the APM Server's version
-const version = "9.5.0"
+const version = "9.4.0"
diff --git a/internal/version/version.go b/internal/version/version.go
index 22e70c288..b0c38c11f 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -18,4 +18,4 @@
package version
// Version holds the APM Server version.
-const Version = "9.5.0"
+const Version = "9.4.0"
::endgroup::
::group::create-commit
M Makefile
M cmd/intake-receiver/version.go
M internal/version/version.go
?? Makefile.bck
?? cmd/intake-receiver/version.go.bck
?? internal/version/version.go.bck
[9.4 d163a850d] [Release] update version 9.4.0
6 files changed, 435 insertions(+), 3 deletions(-)
create mode 100644 Makefile.bck
create mode 100644 cmd/intake-receiver/version.go.bck
create mode 100644 internal/version/version.go.bck
::endgroup::
INFO: Create feature branch and update the versions. Target branch main
::group::create-branch update-9.4.0
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 320 commits.
(use "git push" to publish your local commits)
Switched to a new branch 'update-9.4.0'
::endgroup::
>> update-mergify
::warn::Mergify already contains backport-9.4
>> update-version
::group::git-diff
::endgroup::
::group::create-commit
?? cmd/intake-receiver/version.go.bck
?? internal/version/version.go.bck
[update-9.4.0 cf9d60ab5] [Release] update version 9.5.0
2 files changed, 42 insertions(+)
create mode 100644 cmd/intake-receiver/version.go.bck
create mode 100644 internal/version/version.go.bck
::endgroup::
>> update-changelog
>> updating changelog for 9.4.0
::group::git-diff
diff --git a/docs/release-notes/breaking-changes.md b/docs/release-notes/breaking-changes.md
index 63543e3cb..42c0ab09c 100644
--- a/docs/release-notes/breaking-changes.md
+++ b/docs/release-notes/breaking-changes.md
@@ -21,7 +21,11 @@ Breaking changes can impact your Elastic applications, potentially disrupting no
% **Action**<br> Steps for mitigating deprecation impact.
% ::::
+## 9.4.0 [9-4-0]
+
% Commenting 9.4.0 release notes until it is released
+_No breaking changes_
+
% ## 9.4.0 [9-4-0]
% _No breaking changes_
diff --git a/docs/release-notes/deprecations.md b/docs/release-notes/deprecations.md
index 340f138ec..7515a20e4 100644
--- a/docs/release-notes/deprecations.md
+++ b/docs/release-notes/deprecations.md
@@ -18,7 +18,11 @@ Review the deprecated functionality for Elastic APM. While deprecations have no
% **Action**<br> Steps for mitigating deprecation impact.
% ::::
+## 9.4.0 [9-4-0]
+
% Commenting 9.4.0 release notes until it is released
+_No deprecations_
+
% ## 9.4.0 [9-4-0]
% _No deprecations_
diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md
index 3f5c70d9a..20ddd15ba 100644
--- a/docs/release-notes/index.md
+++ b/docs/release-notes/index.md
@@ -24,6 +24,18 @@ To check for security updates, go to [Security announcements for the Elastic sta
% ### Fixes [apm-next-fixes]
% * 1 sentence describing the change. ([#PR number](https://github.com/elastic/apm-server/pull/PR number))
+## 9.4.0 [apm-9.4.0-release-notes]
+
+% ### Features and enhancements [apm-9.4.0-features-enhancements]
+% * 1 sentence describing the change. ([#PR number](https://github.com/elastic/apm-server/pull/PR number))
+
+_No new features or enhancements_
+
+% ### Fixes [apm-9.4.0-fixes]
+% * 1 sentence describing the change. ([#PR number](https://github.com/elastic/apm-server/pull/PR number))
+
+_No new fixes_
+
## 9.4.1 [apm-9.4.1-release-notes]
### Fixes [apm-9.4.1-fixes]
::endgroup::
::group::create-commit
M docs/release-notes/breaking-changes.md
M docs/release-notes/deprecations.md
M docs/release-notes/index.md
[update-9.4.0 ead22e35d] [Release] update changelogs for 9.4 release
3 files changed, 20 insertions(+)
::endgroup::
INFO: Push changes to v1v/apm-server and create the relevant Pull Requests
Enumerating objects: 17, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 12 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.03 KiB | 150.00 KiB/s, done.
Total 9 (delta 6), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (6/6), completed with 6 local objects.
remote: Bypassed rule violations for refs/heads/9.4:
remote:
remote: - This branch must not contain merge commits.
remote: Found 1 violation:
remote:
remote: f831d2a93b9a51a58a63caff33761ae1c562b9df
remote:
remote:
remote: Create a pull request for '9.4' on GitHub by visiting:
remote: https://github.com/v1v/apm-server/pull/new/9.4
remote:
To https://github.com/v1v/apm-server.git
* [new branch] 9.4 -> 9.4
::group::create-pull-request update-9.4.0 -> main
Enumerating objects: 23, done.
Counting objects: 100% (23/23), done.
Delta compression using up to 12 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (13/13), 1.78 KiB | 202.00 KiB/s, done.
Total 13 (delta 8), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (8/8), completed with 7 local objects.
remote:
remote: Create a pull request for 'update-9.4.0' on GitHub by visiting:
remote: https://github.com/v1v/apm-server/pull/new/update-9.4.0
remote:
To https://github.com/v1v/apm-server.git
* [new branch] update-9.4.0 -> update-9.4.0
--label
Creating pull request for update-9.4.0 into main in v1v/apm-server
https://github.com/v1v/apm-server/pull/90
::endgroup::IIRC, you could run something like:
$ GITHUB_TOKEN=$(gh auth token) make major-release RELEASE_VERSION=9.0.0 PROJECT_OWNER=v1v RELEASE_TYPE=majorbut if I run it again it does not work
$ GITHUB_TOKEN=$(gh auth token) make minor-release RELEASE_VERSION=9.4.0 PROJECT_OWNER=v1v RELEASE_TYPE=minor
INFO: Create GitHub label backport for the version 9.4.0
::group::create-github-label backport-9.4
✓ Label "backport-9.4" created in v1v/apm-server
::endgroup::
INFO: Create release branch and update new version 9.4.0
::group::create-branch 9.4
WARNING: Branch 9.4 already exists. Fetching and checking out.
From https://github.com/v1v/apm-server
! [rejected] 9.4 -> 9.4 (non-fast-forward)
Switched to branch '9.4'
::endgroup::
>> update-version
>> update-version-makefile
::group::git-diff
diff --git a/Makefile.bck b/Makefile.bck
index 652a9576a..1206b5a97 100644
--- a/Makefile.bck
+++ b/Makefile.bck
@@ -227,7 +227,7 @@ testing/infra/terraform/modules/%/README.md: .FORCE
# Beats synchronisation.
##############################################################################
-BEATS_VERSION?=main
+BEATS_VERSION?=9.4
BEATS_MODULE:=github.com/elastic/beats/v7
.PHONY: update-beats
diff --git a/cmd/intake-receiver/version.go.bck b/cmd/intake-receiver/version.go.bck
index d96214af7..6ed99d39b 100644
--- a/cmd/intake-receiver/version.go.bck
+++ b/cmd/intake-receiver/version.go.bck
@@ -18,4 +18,4 @@
package main
// version matches the APM Server's version
-const version = "9.5.0"
+const version = "9.4.0"
diff --git a/internal/version/version.go.bck b/internal/version/version.go.bck
index 22e70c288..b0c38c11f 100644
--- a/internal/version/version.go.bck
+++ b/internal/version/version.go.bck
@@ -18,4 +18,4 @@
package version
// Version holds the APM Server version.
-const Version = "9.5.0"
+const Version = "9.4.0"
::endgroup::
::group::create-commit
M Makefile.bck
M cmd/intake-receiver/version.go.bck
M internal/version/version.go.bck
[9.4 b1789d666] [Release] update version 9.4.0
3 files changed, 3 insertions(+), 3 deletions(-)
::endgroup::
INFO: Create feature branch and update the versions. Target branch main
::group::create-branch update-9.4.0
Switched to branch 'main'
Your branch is ahead of 'origin/main' by 320 commits.
(use "git push" to publish your local commits)
Switched to a new branch 'update-9.4.0'
::endgroup::
>> update-mergify
::warn::Mergify already contains backport-9.4
>> update-version
::group::git-diff
::endgroup::
::group::create-commit
?? cmd/intake-receiver/version.go.bck
?? internal/version/version.go.bck
[update-9.4.0 b9997ec7d] [Release] update version 9.5.0
2 files changed, 42 insertions(+)
create mode 100644 cmd/intake-receiver/version.go.bck
create mode 100644 internal/version/version.go.bck
::endgroup::
>> update-changelog
>> updating changelog for 9.4.0
::group::git-diff
diff --git a/docs/release-notes/breaking-changes.md b/docs/release-notes/breaking-changes.md
index 63543e3cb..42c0ab09c 100644
--- a/docs/release-notes/breaking-changes.md
+++ b/docs/release-notes/breaking-changes.md
@@ -21,7 +21,11 @@ Breaking changes can impact your Elastic applications, potentially disrupting no
% **Action**<br> Steps for mitigating deprecation impact.
% ::::
+## 9.4.0 [9-4-0]
+
% Commenting 9.4.0 release notes until it is released
+_No breaking changes_
+
% ## 9.4.0 [9-4-0]
% _No breaking changes_
diff --git a/docs/release-notes/deprecations.md b/docs/release-notes/deprecations.md
index 340f138ec..7515a20e4 100644
--- a/docs/release-notes/deprecations.md
+++ b/docs/release-notes/deprecations.md
@@ -18,7 +18,11 @@ Review the deprecated functionality for Elastic APM. While deprecations have no
% **Action**<br> Steps for mitigating deprecation impact.
% ::::
+## 9.4.0 [9-4-0]
+
% Commenting 9.4.0 release notes until it is released
+_No deprecations_
+
% ## 9.4.0 [9-4-0]
% _No deprecations_
diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md
index 3f5c70d9a..20ddd15ba 100644
--- a/docs/release-notes/index.md
+++ b/docs/release-notes/index.md
@@ -24,6 +24,18 @@ To check for security updates, go to [Security announcements for the Elastic sta
% ### Fixes [apm-next-fixes]
% * 1 sentence describing the change. ([#PR number](https://github.com/elastic/apm-server/pull/PR number))
+## 9.4.0 [apm-9.4.0-release-notes]
+
+% ### Features and enhancements [apm-9.4.0-features-enhancements]
+% * 1 sentence describing the change. ([#PR number](https://github.com/elastic/apm-server/pull/PR number))
+
+_No new features or enhancements_
+
+% ### Fixes [apm-9.4.0-fixes]
+% * 1 sentence describing the change. ([#PR number](https://github.com/elastic/apm-server/pull/PR number))
+
+_No new fixes_
+
## 9.4.1 [apm-9.4.1-release-notes]
### Fixes [apm-9.4.1-fixes]
::endgroup::
::group::create-commit
M docs/release-notes/breaking-changes.md
M docs/release-notes/deprecations.md
M docs/release-notes/index.md
[update-9.4.0 faa1d0714] [Release] update changelogs for 9.4 release
3 files changed, 20 insertions(+)
::endgroup::
INFO: Push changes to v1v/apm-server and create the relevant Pull Requests
To https://github.com/v1v/apm-server.git
! [rejected] 9.4 -> 9.4 (non-fast-forward)
error: failed to push some refs to 'https://github.com/v1v/apm-server.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you want to integrate the remote changes, use 'git pull'
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
make: *** [minor-release] Error 1Likely this is related to:
- it checkouts a branch and its makefile reference is not up-to-date with the changes in this PR.
Likely it requires to be backported to all the active branches, so we can validate if it works afterwards
Contributor
|
This pull request is now in conflicts. Could you fix it @ninalee12? 🙏 |
💚 Build Succeeded
History
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation/summary
Often we re-trigger the version bump pipeline, which re-invokes the release workflow. Without idempotency checks, this would run the release steps again, re-creating the release branch or opening duplicate bump PRs. This PR adds checks to skip the release steps if they've already run.
How to test these changes
Hard to test without triggering an actual release.
We can test the commands
For the branch check (minor):
Should return exit code 0 and print the ref
For the PR check (minor):
For the PR check (patch), find a real past patch PR to verify:
Related issues